package com.chexiehui.jc.mvp.mine;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BaseView;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 我的爱车添加
 * @Auth SongJun
 * @Date 2020/05/21 00:18
 **/
public interface MyCarAddCovenant {

    interface View extends BaseView {
        void onUploadTravelLicenseImageSuccess(BaseModel<String> successResult);

        void onUploadTravelLicenseImageFailure(BaseModel<Object> failureResult);

        void onUploadDriverLicenseImageSuccess(BaseModel<String> successResult);

        void onUploadDriverLicenseImageFailure(BaseModel<Object> failureResult);

        void onAddCarSuccess(BaseModel<Object> successResult);

        void onAddCarFailure(BaseModel<Object> failureResult);

        String getCarTypeId();

        String getTravelLicenseImage();

        String getDriverLicenseImage();

    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_MY_CAR_ADD)
        Observable<BaseModel<Object>> addCar(
                @Field("carTypeId") String carTypeId,
                @Field("travellicenseImg") String travellicenseImg,
                @Field("driverslicenseImg") String driverslicenseImg
        );
    }

    interface Presenter {
        void uploadTravelLicenseImage(String filePath);

        void uploadDriverLicenseImage(String filePath);

        void addCar();
    }

}